#include "mat3_gtest.hpp"

Mat3Test::Mat3Test()
    :TestMat()
{
}

Mat3Test::~Mat3Test()
{
}

void Mat3Test::SetUp()
{
    int data[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8 };
    TestMat.FromArray(data);
}

void Mat3Test::TearDown()
{
}

TEST_F(Mat3Test, SetUpSuccess)
{
    for (int i = 0; i < 9; ++i)
    {
        EXPECT_EQ(i, TestMat(i / 3, i % 3));
    }
}

TEST_F(Mat3Test, CopyConstructor)
{
    Mat3 copy(TestMat);

    for (int i = 0; i < 3; ++i)
    {
        for (int j = 0; j < 3; ++j)
        {
            EXPECT_EQ(TestMat(i, j), copy(i, j));
        }
    }
}